package com.xiaoxing.yunshu.mvp.api;

import com.xiaoxing.yunshu.mvp.ui.entity.CheLiangXinXi;
import com.xiaoxing.yunshu.mvp.ui.entity.CheLiangXinXiAdd;
import com.xiaoxing.yunshu.mvp.ui.entity.CheLiangXinXiEdit;
import com.xiaoxing.yunshu.mvp.ui.entity.DeleteTruck;
import com.xiaoxing.yunshu.mvp.ui.entity.FinishMaterialPhotoVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.FinishPhotoVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.FinishScanVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.FinishVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.ForgetPwdSendValidateCode;
import com.xiaoxing.yunshu.mvp.ui.entity.ForgotPwd;
import com.xiaoxing.yunshu.mvp.ui.entity.GeRenXinXi;
import com.xiaoxing.yunshu.mvp.ui.entity.GetDistributingCount;
import com.xiaoxing.yunshu.mvp.ui.entity.GetTruckTypeList;
import com.xiaoxing.yunshu.mvp.ui.entity.GrabOrders;
import com.xiaoxing.yunshu.mvp.ui.entity.JieSuanDan;
import com.xiaoxing.yunshu.mvp.ui.entity.JinXingZhongXiangQing;
import com.xiaoxing.yunshu.mvp.ui.entity.LoadMaterialPhotoVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.LoadPhotoVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.LoadScanVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.LoadedVerify;
import com.xiaoxing.yunshu.mvp.ui.entity.Login;
import com.xiaoxing.yunshu.mvp.ui.entity.OrdersDaiQiangDan;
import com.xiaoxing.yunshu.mvp.ui.entity.OrdersJinXingZhong;
import com.xiaoxing.yunshu.mvp.ui.entity.OrdersYiWanCheng;
import com.xiaoxing.yunshu.mvp.ui.entity.QiangDan;
import com.xiaoxing.yunshu.mvp.ui.entity.QiangDanDetail;
import com.xiaoxing.yunshu.mvp.ui.entity.QiangDanSubmit;
import com.xiaoxing.yunshu.mvp.ui.entity.QuanXianSheZhi;
import com.xiaoxing.yunshu.mvp.ui.entity.Register;
import com.xiaoxing.yunshu.mvp.ui.entity.RegisterSendValidateCode;
import com.xiaoxing.yunshu.mvp.ui.entity.SendFinishVerifyNotice;
import com.xiaoxing.yunshu.mvp.ui.entity.StartDistibute;
import com.xiaoxing.yunshu.mvp.ui.entity.WoDe;
import com.xiaoxing.yunshu.mvp.ui.entity.XiuGaiMiMa;
import com.xiaoxing.yunshu.mvp.ui.entity.YiFenPei;
import com.xiaoxing.yunshu.mvp.ui.entity.YiFenPeiXiangQing;
import com.xiaoxing.yunshu.mvp.ui.entity.YiWanChengXiangQing;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;


public interface ApiService {

    @GET("Account/Get")
    Observable<Login> login(@Query("loginName") String user_login, @Query("password") String user_pass);

    @GET("PSGrab/GetNewGrabList")
    Observable<GrabOrders> getGrabOrdersData(@QueryMap Map<String, String> map);

    @GET("PSGrab/GetNewGrabList")
    Observable<OrdersDaiQiangDan> getOrdersDaiQiangDanData(@QueryMap Map<String, String> map);

    //http://dezhou.xywuhe.com:1233/api/PSTaskBill/GetDistributingList?startIndex=1&endIndex=10
    @GET("PSTaskBill/GetDistributingList")
    Observable<OrdersJinXingZhong> getOrdersJinXingZhongData(@QueryMap Map<String, String> map);

    //http://dezhou.xywuhe.com:1233/api/PSGrab/GetFinishedList?startIndex=1&endIndex=10
    @GET("PSGrab/GetFinishedList")
    Observable<OrdersYiWanCheng> getOrdersYiWanChengData(@QueryMap Map<String, String> map);

    @FormUrlEncoded
    @POST("Account/Register")
    Observable<Register> getRegisterData(@FieldMap Map<String, String> map);

    Observable<QiangDan> getQiangDanData(Map<String, String> map);

    Observable<WoDe> getWoDeData(Map<String, String> map);


    @GET("Account/ModifyPassword")
    Observable<ForgotPwd> getForgotPwdData(@QueryMap Map<String, String> map);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("Account/ModifyDriver")
    Observable<GeRenXinXi> getGeRenXinXiData(@Body RequestBody info);

    @GET("Account/GetTruckList")
    Observable<CheLiangXinXi> getCheLiangXinXiList(@QueryMap Map<String, String> map);

    @GET("Account/DeleteTruck")
    Observable<DeleteTruck> deleteTruck(@QueryMap Map<String, String> map);

    @GET("Account/ModifyPassword")
    Observable<XiuGaiMiMa> getXiuGaiMiMaData(@QueryMap Map<String, String> map);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("Account/AddTruck")
    Observable<CheLiangXinXiAdd> getCheLiangXinXiAddData(@Body RequestBody info);

    @GET("Account/GetTruckTypeList")
    Observable<GetTruckTypeList> getTruckTypeList(@QueryMap Map<String, String> map);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("Account/ModifyTruck")
    Observable<CheLiangXinXiEdit> getCheLiangXinXiEditData(@Body RequestBody info);

    @GET("Account/ForgetPwdSendValidateCode")
    Observable<ForgetPwdSendValidateCode> forgetPwdSendValidateCode(@QueryMap Map<String, String> map);

    @GET("Account/RegisterSendValidateCode")
    Observable<RegisterSendValidateCode> registerSendValidateCode(@QueryMap Map<String, String> map);

    @GET("PSGrab/GetDetail")
    Observable<QiangDanDetail> getQiangDanDetailList(@QueryMap Map<String, String> map);

    @POST("PSGrab/AddGrabItem")
    Observable<QiangDanSubmit> getQiangDanSubmitData(@QueryMap Map<String, String> map);

    @GET("PSGrab/GetDistributeList")
    Observable<YiFenPei> getYiFenPeiData(@QueryMap Map<String, String> map);

    @GET("PSGrab/GetDetail")
    Observable<YiFenPeiXiangQing> getYiFenPeiXiangQingList(@QueryMap Map<String, String> map);

    //http://dezhou.xywuhe.com:1233/api/PSTaskBill/GetDetail?grabNo=%E6%8A%A2%E5%8D%95%E7%BC%96%E5%8F%B7
    @GET("PSTaskBill/GetDetail")
    Observable<JinXingZhongXiangQing> getJinXingZhongXiangQingList(@QueryMap Map<String, String> map);


    @GET("PSTaskBill/LoadScanVerify")
    Observable<LoadScanVerify> loadScanVerify(@QueryMap Map<String, String> map);


    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("PSTaskBill/LoadMaterialPhotoVerify")
    Observable<LoadMaterialPhotoVerify> loadMaterialPhotoVerify(@Body RequestBody info);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("PSTaskBill/LoadPhotoVerify")
    Observable<LoadPhotoVerify> loadPhotoVerify(@Body RequestBody info);

    @GET("PSTaskBill/LoadedVerify")
    Observable<LoadedVerify> loadedVerify(@QueryMap Map<String, String> map);

    @GET("PSGrab/StartDistibute")
    Observable<StartDistibute> startDistibute(@QueryMap Map<String, String> map);


    @GET("PSTaskBill/FinishScanVerify")
    Observable<FinishScanVerify> finishScanVerify(@QueryMap Map<String, String> map);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("PSTaskBill/FinishMaterialPhotoVerify")
    Observable<FinishMaterialPhotoVerify> finishMaterialPhotoVerify(@Body RequestBody info);

    @Headers({"Content-Type: application/json", "Accept: application/json"})//需要添加头
    @POST("PSTaskBill/FinishPhotoVerify")
    Observable<FinishPhotoVerify> finishPhotoVerify(@Body RequestBody info);

    @GET("PSTaskBill/FinishVerify")
    Observable<FinishVerify> finishVerify(@QueryMap Map<String, String> map);

    @GET("PSGrab/GetDetail")
    Observable<YiWanChengXiangQing> getYiWanChengXiangQingList(@QueryMap Map<String, String> map);
    ///api/PSTaskBill/SendFinishVerifyNotice?taskNo=PT202004270001
    @GET("PSTaskBill/SendFinishVerifyNotice")
    Observable<SendFinishVerifyNotice> sendFinishVerifyNotice(@QueryMap Map<String, String> map);

    Observable<QuanXianSheZhi> getQuanXianSheZhiData(Map<String, String> map);

    @GET("PSStatement/GetDetail")
    Observable<JieSuanDan> getJieSuanDanData(@QueryMap Map<String, String> map);
    @GET("PSTaskBill/GetDistributingCount")
    Observable<GetDistributingCount> getDistributingCount(@QueryMap Map<String, String> map);
}
